package com.controller;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @ClassName remoteCroller
 * @Description: TODO
 * @Author lxc
 * @Date 2020/9/6 16:29
 * @Version V1.0
 **/
@RestController
@RequestMapping(value = "remote")
public class remoteCroller {

    /**
     * 远程接收数字
     * @param num
     * @return
     */
    @RequestMapping(value = "/caculate/{num}")
    public String caculate(@PathVariable(name = "num") Integer num){
        String result = new String();
        for(int i=0;i<num;i++){
            result+=i+" ";
            System.out.println(result);
        }
        return result;
    }
}
